import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [

    {
      path: '/back/',
      redirect: '/back/login'
    },
    {
      path: '/back/',
      component: () => import('../backviews/common/Home.vue'),
      meta: {
        title: '自述文件'
      },
      children: [
        // 后端登录成功首页
        {
          path: '/back/dashboard',
          component: () => import('../backviews/page/Dashboard.vue'),
          meta: {
            title: '系统首页'
          }
        },
        {
          path: '/back/taskdefine',
          component: () => import('../backviews/task/taskdefine/taskdefine.vue'),
          meta: {
            title: '任务定义'
          }
        }, {
          path: '/back/taskdeploy',
          component: () => import('../backviews/task/taskdeploy/taskdeploy.vue'),
          meta: {
            title: '任务部署'
          }
        },
        {
          path: '/back/taskperfromlog',
          component: () => import('../backviews/task/taskperfromlog.vue'),
          meta: {
            title: '任务执行日志'
          }
        }
      ]
    },
    {
      path: '/back/login',
      component: () => import('../backviews/login.vue'),
      meta: {
        title: '支持作者'
      }
    }

  ]
})
